<%@ page language="java" contentType="text/html; charset=UTF-8"  pageEncoding="UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<script type="text/javascript">
	
</script>
</head>
<body>
<table border="1" width="600">
	<tr>
		<td colspan="8" align="right"><a href="admin/add.jsp">添加用户</a></td>
	</tr>
	<c:forEach items="${query}" var="student">
		<tr>
			<td>${student.id}</td>
			<td>${student.username}</td>
			<td>${student.password}</td>
			<td><a href="${pageContext.request.contextPath}/modify?id=${student.id}">修改</a>|<a onclick="return confirm('确定要删除吗？')" href="${pageContext.request.contextPath}/delete?id=${student.id}">删除</a></td>
		</tr>
	</c:forEach>
	<tr>
		<td colspan="8">
<%--			&lt;%&ndash;1.判断是否显示上一页&ndash;%&gt;--%>
<%--			<c:if test="${pageBean.currentPage!=1}">--%>
<%--				<a href="${pageContext.request.contextPath}/student/FindPageStudentController?currentPage=${pageBean.lastPage}">--%>
<%--					上一页--%>
<%--				</a>--%>
<%--			</c:if>--%>
<%--			&lt;%&ndash;2.显示导航的页码数字&ndash;%&gt;--%>
<%--			<c:forEach begin="${pageBean.firstPage}" end="${pageBean.endPage}" var="page">--%>
<%--				<a href="${pageContext.request.contextPath}/student/FindPageStudentController?currentPage=${page}">--%>
<%--					${page}  &nbsp;--%>
<%--				</a>--%>
<%--			</c:forEach>--%>
<%--			&lt;%&ndash;3.判断是否显示下一页&ndash;%&gt;--%>
<%--			<c:if test="${pageBean.currentPage!=pageBean.totalPage}">--%>
<%--			<a href="${pageContext.request.contextPath}/student/FindPageStudentController?currentPage=${pageBean.nextPage}">--%>
<%--						下一页--%>
<%--			</a>--%>
<%--			</c:if>--%>
<%--	&lt;%&ndash;<td colspan="8">--%>
   <a href="/listStudent?currentPage=1&pageSize=${listAll.pageSize}">首页</a>
   <a href="/listStudent?currentPage=${listAll.currentPage-1}&pageSize=${listAll.pageSize}">上一页</a>
   <c:forEach var="num" begin="1" end="${listAll.pageCount}">
       <a href="/listStudent?currentPage=${num}&pageSize=${listAll.pageSize}">${num}</a>
   </c:forEach>
   <a href="/listStudent?currentPage=${listAll.currentPage+1}&pageSize=${listAll.pageSize}">下一页</a>
   <a href="/listStudent?currentPage=${listAll.pageCount}&pageSize=${listAll.pageSize}">尾页</a>
   [共${listAll.currentPage}/${listAll.pageCount}页]
</td>
		</td>
	</tr>
</table>
</body>
</html>